package demo01;

public class Decorator implements Component {
    protected Component component;

    public Component getComponent() {
        return component;
    }

    public void setComponent(Component component) {
        this.component = component;
    }

    @Override
    public void Operation() {
    if (component!=null){
        component.Operation();
    }
    }


}
